<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>父节点与子节点</title>
	</head>
	<body>
		<div class="yeye">
			<div class="fuqin">
				<div class="erzi">
					<span>1</span>
					<span>2</span> 
					<span>3</span>
					<span>4</span>
				</div>
			</div>
		</div>
		<script>
			var yeye = document.querySelector('.yeye');
			console.log(yeye);
			var fuqin = document.querySelector('.fuqin');
			var erzi = document.querySelector('.erzi');
			// 通过某一个元素节点，获取其父亲节点
			var yeye2 = fuqin.parentNode;
			console.log(yeye2);
			// 获取儿子们的节点
			console.log(erzi.childNodes);
			//  主要掌握children
			console.log(erzi.children);
			
		</script>
		
	</body>
</html>